<?php
session_start();
header('Content-Type:text/html;charset=utf-8');
require_once($_SERVER['DOCUMENT_ROOT'].'/public/func.php');
$config=require_once($_SERVER['DOCUMENT_ROOT'].'/public/config.php');
$_POST['mfile']=up('mfile');
$arr=array('uid'=>$_POST['uid'],'cid'=>$_POST['cid'],'title'=>$_POST['title'],'autor'=>$_POST['autor'],'content'=>$_POST['content'],'mfile'=>$_POST['mfile'],'tags'=>$_POST['tags'],'status'=>$_POST['status'],'ctime'=>$_POST['ctime']);
$rec=xiugai($config,'article',"where id={$_POST['id']}",$arr);
if($rec){
  echo "<script>alert('编辑成功');window.location.href='/admin/article/design.php'</script>";
}else{
  echo $sql;die;
  echo "<script>alert('编辑失败');window.location.href='/admin/article/design.php'</script>";
}
?>